package com.feicheng.house.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.feicheng.house.result.ResultInfo;
import com.feicheng.house.service.IVipClientDepositCardVoService;

/**
 * <p>
 * VIEW 前端控制器
 * </p>
 *
 * @author feichengTech
 * @since 2021-11-06
 */
@RestController
@RequestMapping("/house/vip-client-deposit-card-vo")
public class VipClientDepositCardVoController {
	
	@Autowired
	IVipClientDepositCardVoService iVipClientDepositCardVoService;

	/**
	 * 根据Id查询会员
	 * @param vipId
	 * @return 查询结果
	 */
	@GetMapping("/info")
	public ResultInfo getOneVip(Integer vipId) {
		return iVipClientDepositCardVoService.getOneVip(vipId);
	}
	
	/**
	 * 分页查询会员信息+模糊查询
	 * @param currentPage
	 * @param pageSize
	 * @param searchKey
	 * @return 分页查询结果
	 */

	@GetMapping("/page")
	public ResultInfo getListVip(
			@RequestParam(defaultValue = "1") Integer currentPage,
			@RequestParam(defaultValue = "10") Integer pageSize,
			String searchKey,
			String deadRange,
			String regRange) {
		return iVipClientDepositCardVoService.getListVip(currentPage,pageSize,searchKey,deadRange,regRange);
	}
	
}

